package com.atguigu.test.po;

import com.atguigu.test.annotation.LENGTH;
import com.atguigu.test.annotation.MyComponent;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.stereotype.Component;

/**
 * @author zp
 * @version 1.0
 * @description: user类的代理对象
 * @date 2022/11/30 18:43
 */
@MyComponent(value = "postProcessBeforeInstantiation",className = "com.atguigu.test.po.UserProxy")
@Component
public class UserProxy extends User implements BeanNameAware {
    private String idName;
    @LENGTH(max = 5,min = 1)
    private String beanName;

    @Override
    public void setBeanName(String name) {
        this.beanName = name;
    }

    public String getBeanName() {
        return beanName;
    }

    public String getIdName() {
        return idName;
    }

    public void setIdName(String idName) {
        this.idName = idName;
    }
}
